<template>
	<view class="abount">
	<!-- 	<view class="tops">
			<view>
				<text v-if="lang==0">
					VOTOL使用说明
				</text>
				<text v-if="lang==1">
					Instructions for using VOTOL
				</text>
			</view>
			<view class="bnt">
				<text v-if="lang==0">
					欢迎使用
				</text>
				<text v-if="lang==1">
					Welcome to
				</text>
			</view>
		</view> -->
		<!-- <view class="cons"> -->
			<view class="cnt">
				<rich-text :nodes="content"></rich-text>
			</view>
		<!-- </view> -->
	
		
		<!-- <tabbar :current="4"></tabbar> -->
	</view>
</template>

<script>
    import Tabbar from '@/components/tabbar/tabbar.vue'
	import uniPopup from "@/components/uni-popup/uni-popup.vue";
	export default {
        components: {
            'view-tabbar': Tabbar, uniPopup
        }, 
		data() {
			return {
				login: true, //是否登录
				userType: 0, //嘉宾状态 0.未申请 1.待审核 2.通过 3.拒绝
				avatar: '', //头像
				nickname: '艾克里里', //昵称
				inviteCode: '', //邀请码
				content:"",
				lang:0
			};
		},
		onLoad() {
			this.getInvite();
		},
		
		onShow() {
			let _this = this;
			
			if(uni.getStorageSync('lang')){
				this.lang =  uni.getStorageSync('lang');
			}
			
			if(this.lang == 1){
				uni.setNavigationBarTitle({
						 title: "User's manual"
				})
			}else{
				uni.setNavigationBarTitle({
					   title: '用户手册'
				})
			}
			
			
			this.$api.request('/api/index/get_text', {type:1}, '', function(res){
				_this.content = res.data
			});
			// if(this.$store.state.token) {
			// 	this.login = true;
			// 	this.$api.request('/api/user/center', {}, this.$store.state.token, function(res){
			// 		if(res.code == 1) {
			// 			_this.avatar = res.data.avatar;
			// 			_this.nickname = res.data.nickname;
			// 			_this.userType = res.data.guest_status;
			// 		}
			// 	});
			// }else {
			// 	this.login = false;
			// 	this.avatar = '../../../static/nologin.png';
			// 	this.nickname = '未登录';
			// }
		},
		methods: {
			getInvite(){
				//使用说明
				
				
			}
		},
		
	}
</script>

<style lang="scss" scoped>
	.abount{
		background: #19253e;
		height: 100vh;
		float: left;
		width:96%;
		padding-left: 2%;
		padding-right: 2%;
		color: #fff;
		.tops{
			margin-top: 30px;
			width: 100%;
			text-align: center;
			color: #fff;
			font-size: 40rpx;
			font-weight: 700;
			.bnt{
				font-weight: 400;
				margin-top: 10rpx;
				font-size: 25rpx;
			}
		}
		
		.cons{
			margin-top: 20rpx;
			background: #fff;
			width: 90%;
			margin-left: 5%;
			border-radius: 1em;
			height: 73vh;
			font-size: 30rpx;;
			.cnt{
				overflow: auto;
				height: 70vh;
				padding-top: 40rpx;
				width: 90%;
				margin-left: 5%;;
				
				view:last-child{
					margin-top: 40rpx;;
				}
			}
		}
		
		
	}

	
</style>
